With continuous development of the science and technology, a growing quantity of devices with cameras are applied to daily lives. However, because a photo captured by a camera is an image obtained by means of projection transformation, an image with a distorted rectangular frame that is captured by the camera needs to be corrected, so that the rectangular frame is still rectangular in the image, and a length-width ratio remains the same as a length-width ratio of a rectangular frame in the real world.
At present, before an image with a rectangular frame is corrected, a fixed color that is set by an application is used to draw a detected border of a quadrilateral. However, because the color is relatively undiversified, and colors of areas at two sides of the border are relatively diversified, in some scenarios, a border color and the colors of the areas at the two sides of the border may all be warm colors or cool colors. Consequently, contrast between the border color and the colors of the areas at the two sides of the border is low. As shown in FIG. 1, it is assumed that a border of an upper edge of a quadrilateral is white (that is, a fixed color that is set by a device is white), and colors of areas at two sides of the border are respectively red and yellow. Because red and yellow are of relatively high brightness and both are “warm” colors, contrast between the color of the upper edge of the quadrilateral and the colors of the surroundings is low.
Therefore, a problem that contrast between a border color and colors of areas at two sides of a border is low is an urgent problem to be resolved at present.